package com.sky.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component  //定时任务类
public class QuickTask {
    //每隔五秒输出当前时间
    //@Scheduled(fixedDelay = 5000)
    public void printCurrentTime(){
        System.out.println("当前时间:"+ LocalDateTime.now());
    }


}
